package com.zzzzzz.core.dao.search;

import java.util.ArrayList;
import java.util.List;

public class SearchContainer<R> {
	
	public static final int DEFAULT_ITEMS_PER_PAGE = 20;

	public static final int DEFAULT_NUM_DISPLAY_PAGES = 11;

	public static final int DEFAULT_NUM_EDGE_PAGES = 2;

	private List<R> results = new ArrayList<R>();
	
	private int total;
	
	private int cur;
	
	private String actionPrefixURL;
	
	private int itemsPerPage;
	
	private int numDisplayPages;
	
	private int numEdgePages;
	
	public SearchContainer() {
		
	}
	
	public SearchContainer(List<R> results, int total, int cur, String actionPrefixURL) {
		this.results = results;
		this.total = total;
		this.cur = cur;
		this.actionPrefixURL = actionPrefixURL;
	}
	
	public SearchContainer(List<R> results, int total, int cur, String actionPrefixURL, int itemsPerPage, int numDisplayPages, int numEdgePages) {
		this.results = results;
		this.total = total;
		this.cur = cur;
		this.actionPrefixURL = actionPrefixURL;
		this.itemsPerPage = itemsPerPage;
		this.numDisplayPages = numDisplayPages;
		this.numEdgePages = numEdgePages;
	}

	public List<R> getResults() {
		return results;
	}

	public void setResults(List<R> results) {
		this.results = results;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getCur() {
		return cur;
	}

	public void setCur(int cur) {
		this.cur = cur;
	}

	public String getActionPrefixURL() {
		return actionPrefixURL;
	}

	public void setActionPrefixURL(String actionPrefixURL) {
		this.actionPrefixURL = actionPrefixURL;
	}

	public int getItemsPerPage() {
		return itemsPerPage;
	}

	public void setItemsPerPage(int itemsPerPage) {
		this.itemsPerPage = itemsPerPage;
	}

	public int getNumDisplayPages() {
		return numDisplayPages;
	}

	public void setNumDisplayPages(int numDisplayPages) {
		this.numDisplayPages = numDisplayPages;
	}

	public int getNumEdgePages() {
		return numEdgePages;
	}

	public void setNumEdgePages(int numEdgePages) {
		this.numEdgePages = numEdgePages;
	}

}
